package com.fate.system.task;

import lombok.extern.slf4j.Slf4j;
import org.quartz.Job;
import org.quartz.JobExecutionContext;

import java.time.LocalDateTime;

@Slf4j
public class SampleParamTask implements Job {
  /** 若参数变量名修改 QuartzJobController中也需对应修改 */
  private String parameter;

  public void setParameter(String parameter) {
    this.parameter = parameter;
  }

  @Override
  public void execute(JobExecutionContext jobExecutionContext) {
    log.info(
        String.format(
            "welcome %s! Jeecg-Boot 带参数定时任务 SampleParamJob !   时间:" + LocalDateTime.now(),
            this.parameter));
  }
}
